package com.lcu.test;

import com.lcu.bos.dao.ISubareaDao;
import com.lcu.bos.modle.Decidedzone;
import com.lcu.bos.modle.Staff;
import com.lcu.bos.modle.Subarea;
import com.lcu.bos.service.IDecidedzoneService;
import com.lcu.bos.service.ISubareaService;
import com.lcu.bos.service.IUserService;
import com.lcu.bos.service.base.BaseServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.io.Serializable;
import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class Demo03 {
    //测试Dao
    /**
     * 1.public void executeUpdate(String hql, Object... objs)
     * 2.public void executeUpdate(String queryName, Object... objs)
     * queryName是在配置文件里声明的一个hql查询语句
     */

    @Autowired
    private IDecidedzoneService decidedzoneService;
    @Test
    public void test1(){
        Decidedzone dz = new Decidedzone();
        dz.setId("103");
        Staff st=new Staff();
        st.setId("50282b8151q42ed2015c242ffe8b0003");
        dz.setStaff(st);
       String []s={"A001"};
        decidedzoneService.save(dz,s);
    }
}

